package main

import "fmt"

func main() {
	ch := make(chan int)
	go func() {
		for i := 0; i < 2; i++ {
			fmt.Println("i=", i)
			ch <- i
		}
	}()
	for true {
		data := <-ch
		fmt.Println(data)
	}
}
